package com.psmz.mqim.model;

/**
 * Typ wiadomosci. Aktualnie nieuzywany.
 * 
 * @author pszwarc
 * 
 */
public enum IMMessageType {

	INIT_MESSAGE("INIT"), TEXT_MESSAGE("TEXT");

	private String stringValue;

	private IMMessageType(String value) {
		this.stringValue = value;
	}

	@Override
	public String toString() {
		return stringValue;
	}

	public static IMMessageType build(String stringValue) {
		if ("INIT".equals(stringValue)) {
			return IMMessageType.INIT_MESSAGE;
		} else if ("TEXT".equals(stringValue)) {
			return IMMessageType.TEXT_MESSAGE;
		} else {
			return null;
		}
	}

}
